"use strict";
cc._RF.push(module, '0236aQh8wFFwKaTCjJs1byK', 'lanuch');
// scripts/huochai/lanuch.js

'use strict';

cc.Class({
    extends: cc.Component,

    properties: {
        display: cc.Sprite
    },

    start: function start() {
        this._isShow = false;
        this.tex = new cc.Texture2D();
    },
    onClick: function onClick() {
        this._isShow = !this._isShow;
        // 发消息给子域
        wx.postMessage({
            message: 'Show'
        });
    },
    _updaetSubDomainCanvas: function _updaetSubDomainCanvas() {
        if (!this.tex) {
            return;
        }
        this.tex.initWithElement(sharedCanvas);
        this.tex.handleLoadedTexture();
        this.display.spriteFrame = new cc.SpriteFrame(this.tex);
    },
    update: function update() {
        this._updaetSubDomainCanvas();
    }
});

cc._RF.pop();